package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/api")
public class IndexAction {

  @Value("${api.url}")
  private String apiAddress;

  @RequestMapping("/query")
  public String query(@RequestParam String pageNo, @RequestParam String pageSize) throws Exception {
    return ApiUtil.getPageData(pageNo, pageSize,apiAddress);
  }
}
